package com.jumi.microservice.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jumi.microservice.common.base.dto.ResponseResult;
import com.jumi.microservice.service.IJmIdentityAuthenticationLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 角色认证日志 前端控制器
 * </p>
 *
 * @author 要挑客户管理团队
 * @since 2020-07-14
 */
@RestController
@RequestMapping("/jm-identity-authentication-log")
@Api(value="角色认证日志",tags={"角色认证日志"})
public class JmIdentityAuthenticationLogController {

    @Autowired
    IJmIdentityAuthenticationLogService logService;

    @PostMapping("/getAuthenLog")
    @ApiOperation("角色认证日志列表")
    public ResponseResult getAuthenLog(@ApiParam(value = "用户id",required = true) @RequestParam Integer uid){
        QueryWrapper wrapper=new QueryWrapper();
        wrapper.eq("uid",uid);
        wrapper.orderByDesc("id");
        return ResponseResult.success(logService.list(wrapper));
    }
}
